home *** CD-ROM | disk | FTP | other *** search
-
-
- #ifndef FRDODGE_H
- #define FRDODGE_H
-
- #include "FRCar.h"
-
- class FRDodge : public FRCar
- {
- TERTTIDeclaration;
-
- public:
-
- FRDodge(TEVector &rCenter, Float fInitYRot)
- {
- TEOBoundingBox *pOBox = new TEOBoundingBox;
- TEAABoundingBox BBox;
- TEVector Min, Max;
- TEEngine *pEngine = TEEngine::GetEngine();
- TESoundManager* pSound = TESoundManager::GetSoundManager();
- TEString Name;
-
- Name = "motor3.ogg";
- m_pMotor = pSound->GetSound(Name);
- Name = "brake.ogg";
- m_pBraking = pSound->GetSound(Name);
- Name = "horn1.ogg";
- m_pHorn = pSound->GetSound(Name);
-
- m_fMass = 1600.0f;
-
- m_fMaxRPM = 5000.0f;
- m_fRotFactor = 90.0f;
-
- m_ulNumGears = 6;
- m_aGears = new FRGearInfo[6];
-
- m_aGears[0].fRPMChange = 3500.0f;
- m_aGears[0].fRPMTrans = -100.0f;
- m_aGears[1].fRPMChange = 3500.0f;
- m_aGears[1].fRPMTrans = 100.0f;
- m_aGears[2].fRPMChange = 2500.0f;
- m_aGears[2].fRPMTrans = 150.0f;
- m_aGears[3].fRPMChange = 500.0f;
- m_aGears[3].fRPMTrans = 250.0f;
- m_aGears[4].fRPMChange = 200.0f;
- m_aGears[4].fRPMTrans = 400.0f;
- m_aGears[5].fRPMChange = 150.0f;
- m_aGears[5].fRPMTrans = 500.0f;
-
- m_Center = m_OldCenter = rCenter;
- m_Rotation = TEVector(0.0f, fInitYRot, 0.0f);
-
- m_pModelRef = TEModelManager::GetModelManager()->GetModel("dodge.tmf");
- TEAssert(m_pModelRef);
-
- m_pModelRef->SetAnimation(0);
- m_pModelRef->SetTimeScale(0);
- m_pModelRef->SetLoopAnimation(true);
-
- BBox = m_pModelRef->GetModelBBox();
- BBox.GetData(Min, Max);
- m_CarSize = Max - Min;
-
- m_Center.m_fX = m_OldCenter.m_fX = rCenter.m_fX;
- m_Center.m_fY = m_OldCenter.m_fY = m_fDeltaY = TEAbs(Min.m_fY) + 0.05f;
- m_Center.m_fZ = m_OldCenter.m_fZ = rCenter.m_fZ;
-
- pOBox->SetData(m_Center, Min, Max, m_Rotation);
-
- m_pBoundingVolume = pOBox;
-
- m_fFrontAxis = 0.0f;
- m_fRearAxis = -42.0f;
-
- m_fWheelWidth = 3.5f;
- m_fWheelMov = 2.5f;
-
- m_aLightPos[0] = TEVector(-7.75f, -0.5f, 37.0f);
- m_aLightPos[1] = TEVector( 7.75f, -0.5f, 37.0f);
- m_aLightPos[2] = TEVector(-9.75f, -1.5f, -35.5f);
- m_aLightPos[3] = TEVector( 9.75f, -1.5f, -35.5f);
-
- m_fBrakeEfficiency = 14.0f;
-
- UpdateVectors();
-
- if(ms_bSmoke)
- {
- TEVector Center = m_pBoundingVolume->GetCenter();
- TEVector Tmp = Center + m_aExhaustPos[0].m_fX * m_Right +
- m_aExhaustPos[0].m_fY * m_Up + m_aExhaustPos[0].m_fZ * m_Forward;
-
- m_usNumExhaust = 1;
- m_aExhaustPos[0] = TEVector(10.0f, -4.5f, -38.0f);
-
- m_aExhaust[0] = new TEParticleFX(Tmp, 2, 4, 1.5f, 0, 0, 0, m_Up, 250, 1000,
- 255, 1.0f, true, false);
-
- m_aExhaust[0]->SetColor(255, 255, 255);
-
- pEngine->AddParticleSystem(m_aExhaust[0]);
- }
-
- if(m_pMotor != NULL)
- m_pMotor->Play3D(m_Center, m_Velocity, TESOUND_LOOP, 1.0f);
- }
- };
-
- #endif
-
-